//
//  DiseaseFlowLayout.m
//  KYProject
//
//  Created by Roman on 16/12/21.
//  Copyright © 2016年 Roman. All rights reserved.
//

#import "DiseaseFlowLayout.h"

@implementation DiseaseFlowLayout

- (void)prepareLayout
{
    [super prepareLayout];
    
    int cols = 3;
    int rows = 2;
    
    CGFloat itemH = self.collectionView.height / rows - 2;
    CGFloat itemW = self.collectionView.width / cols -3;
    
    self.itemSize = CGSizeMake(itemW, itemH);
    
    //滚动方向的设置
    self.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    //设置每个item的间距
    self.sectionInset = UIEdgeInsetsMake(0.5, 0.5, 0.5, 0.5);

    self.minimumInteritemSpacing = 1;
    self.minimumLineSpacing = 1;
    
    
}



@end
